package com.aspose.cells;

import java.util.Iterator;

public abstract class zcfq implements Iterable {
   public zcfq b;
   public zcfq c;
   public zcfq d;
   public int e;
   public String f;
   public String g;
   public String h;
   public String i;
   public boolean j;

   public zcfq(zcfq var1, int var2) {
      this.b = var1;
      this.e = var2;
   }

   public String d() {
      return this.a();
   }

   public String a() {
      zcfq var1 = this.k();
      if (var1 == null) {
         return "";
      } else {
         if (var1.l() == null) {
            switch(var1.e) {
            case 3:
               return var1.h;
            }
         }

         StringBuilder var2 = new StringBuilder();
         this.a(var2);
         return com.aspose.cells.b.a.zr.a(var2);
      }
   }

   public void a(String var1) {
      zcfq var2 = this.k();
      if (var2 != null && var2.l() == null && var2.e == 3) {
         var2.h = var1;
      } else {
         this.h();
         zcfv var3 = new zcfv(this);
         var3.h = var1;
         this.d = var3;
         this.d.c = this.d;
      }

   }

   public void h() {
      zcfq var1 = this.k();

      for(zcfq var2 = null; var1 != null; var1 = var2) {
         var2 = var1.c;
         var1.c = null;
      }

      this.d = null;
      if (this.e == 1) {
         ((zcfl)this).a = null;
      }

   }

   private void a(StringBuilder var1) {
      for(zcfq var2 = this.k(); var2 != null; var2 = var2.l()) {
         if (var2.k() == null) {
            if (var2.e == 3) {
               var1.append(var2.a());
            }
         } else {
            var2.a(var1);
         }
      }

   }

   public zcfq a(zcfq var1) {
      var1.b = this;
      if (this.d != null) {
         zcfq var2 = this.d.c;
         var1.c = var2;
         this.d.c = var1;
         this.d = var1;
      } else {
         var1.c = var1;
         this.d = var1;
      }

      return var1;
   }

   public zcfq a(zcfq var1, zcfq var2) {
      if (var2 == null) {
         return this.a(var1);
      } else if (var1 == var2) {
         return var1;
      } else {
         if (this.d == null) {
            this.a(var1);
         } else {
            zcfq var3 = this.d;

            do {
               if (var3.c == var2) {
                  var1.b = this;
                  var3.c = var1;
                  var1.c = var2;
                  return var2;
               }

               var3 = var3.c;
            } while(var3 != this.d);
         }

         return var1;
      }
   }

   public zcfs e(String var1) {
      int var2 = var1.indexOf(58);
      String var3 = var1;
      String var4 = null;
      if (var2 != -1) {
         var4 = var1.substring(0, 0 + var2);
         var3 = var1.substring(var2 + 1);
      }

      return new zcfm(this, var4, var3);
   }

   public zcfs b(String var1, String var2) {
      return new zcfm(this, var1);
   }

   public Iterator iterator() {
      return new zcfr(this);
   }

   public String c() throws Exception {
      StringBuilder var1 = new StringBuilder();
      zcfx var2 = new zcfx(var1);
      var2.c(this.j);
      var2.a((int)0);

      try {
         this.a(var2);
      } finally {
         var2.f();
      }

      return com.aspose.cells.b.a.zr.a(var1);
   }

   public void c(zcfx var1) throws Exception {
   }

   public void a(zcfx var1) throws Exception {
   }

   public String b() throws Exception {
      StringBuilder var1 = new StringBuilder();
      zcfx var2 = new zcfx(var1);
      var2.c(this.j);

      try {
         this.c(var2);
      } finally {
         var2.f();
      }

      return com.aspose.cells.b.a.zr.a(var1);
   }

   public String i() {
      if (this.i == null) {
         if (this.f == null) {
            this.i = this.g;
         } else {
            this.i = this.f + ":" + this.g;
         }
      }

      return this.i;
   }

   public void f(String var1) {
      int var2 = var1.indexOf(58);
      if (var2 == -1) {
         this.g = var1;
      } else {
         this.f = var1.substring(0, 0 + var2);
         this.g = var1.substring(var2 + 1);
      }

   }

   public zcfs j() {
      return new zcfs(this);
   }

   public zcfq k() {
      zcfq var1 = this.d;
      return var1 != null ? var1.c : null;
   }

   public zcfq g(String var1) {
      return this.j().a(var1);
   }

   public zcfq l() {
      return this.b != null && this.b.d != this ? this.c : null;
   }

   public void a(zaop var1) {
      this.g = var1.c;
      this.f = var1.b;
      this.e = var1.a;
      this.h = var1.d;
   }

   public zcfh e() {
      return null;
   }
}
